package com.ruoyi.feign.client.controller;

import com.ruoyi.common.core.context.SecurityContextHolder;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.feign.client.SysUserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SysGateController {
    @Autowired
    private SysUserClient userClient;
    @PostMapping("/testChannel")
    public AjaxResult testChannel(){
        String channel=SecurityContextHolder.getChannel();
        System.out.println(channel);
        AjaxResult ajaxResult=userClient.getInfoNeedChannel(channel,1l);
        return ajaxResult;
    }
}
